package com.luckynote.common;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ImportResource;

import java.util.concurrent.CountDownLatch;



/**
 * <pre>
 * *********************************************
 * Copyright LUCKY-NOTE.
 * All rights reserved.
 * ****************************************************
 *  Version       Date         Author            Desc
 *    v1.0       2019/6/29      bingo
 * ****************************************************
 * </pre>
 */
@SpringBootApplication
@ImportResource(locations={"classpath:applicationContext.xml"})
public class LuckyNoteProvider {

    public static void main(String[] args) throws InterruptedException {
            new SpringApplicationBuilder()
                    .sources(LuckyNoteProvider.class)
                    .web(WebApplicationType.NONE)
                    .run(args);

        CountDownLatch closeLatch = new CountDownLatch(1);
        closeLatch.await();//保持主线程阻塞
    }
}
